/*
 * #%L
 * Client
 * %%
 * Copyright (C) 2011 Ractoc.com
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */
package com.ractoc.opengamefinder.client.plugins.messages;

import com.ractoc.opengamefinder.client.plugins.nifty.BaseScreenType;
import com.ractoc.opengamefinder.client.plugins.nifty.ScreenType;
import com.ractoc.pffj.api.BasePluginMessage;

/**
 * This message wraps the actual message meant for the GUI plugin. The reason
 * for this wrapping is to have a general message we can sent to the GUI plugin
 * and then have the GUI plugin forward this message to the actual code that
 * handles a particular screen. This way, it becomes possible to easily create
 * classes to handle everything related to a single screen. Which in turn makes
 * the code a lot more manageable and maintainable.
 * 
 * @author ractoc
 * @version 0.1
 */
public final class GuiMessage extends BasePluginMessage {

    private BasePluginMessage payload;
    private BaseScreenType screenType;

    /**
     * Default constructor.
     */
    public GuiMessage() {
    }

    /**
     * Sets the wrapped message.
     * @param payloadParam The wrapped message.
     */
    public void setPayload(final BasePluginMessage payloadParam) {
        this.payload = payloadParam;
    }

    /**
     * Gets the wrapped message.
     * @return The wrapped message.
     */
    public BasePluginMessage getPayload() {
        return payload;
    }

    /**
     * Sets the ScreenType.
     * @param typeParam The ScreenType.
     */
    public void setType(final BaseScreenType typeParam) {
        this.screenType = typeParam;
    }

    /**
     * Gets the ScreenType.
     * @return The ScreenType.
     */
    public BaseScreenType getType() {
        return screenType;
    }
}
